<template>
	<view class="recharge">
		<view class="recharge-icon">
			<view class="icon" @click="back">
				<uv-icon name="arrow-left" size="24" bold></uv-icon>
			</view>
			<view class="title">
				星月豆充值
			</view>
		</view>
		<view class="recharge-info">
			<view class="info-title">
				我的星月豆
			</view>
			<view class="info-price">
				{{price}}
			</view>
		</view>
		<view class="recharge-content">
			<view class="content-title">
				星月豆充值
			</view>
			<view class="content-price">
				<view :class="activeRecharge==index?'prices-active':'prices'" v-for="(item,index) in prices"
					:key="index" @click="activePrice(index)">
					<view class="price-1">
						{{item}}
					</view>
					<view class="price-2">
						￥{{item}}
					</view>
				</view>
			</view>
			<view class="content-check">
				<uv-checkbox-group v-model="checkboxValue" shape="circle">
					<uv-checkbox :customStyle="{marginBottom: '8px'}" v-for="(item, index) in checkboxList" :key="index"
						:label="item.name" :name="item.name" inactiveColor="#D3D3D3" labelColor="#D3D3D3"></uv-checkbox>
				</uv-checkbox-group>
				<view class="check-1">
					《用户充值协议》
				</view>
			</view>

		</view>
		<button class="recharge-btn">确认充值</button>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				price: "2222",
				prices: ["5", "10", "20", "50", "100", "200"],
				activeRecharge: 0,
				checkboxValue: ["我已阅读同意并同意"],
				checkboxList: [{
					name: '我已阅读同意并同意',
					disabled: false
				}]
			}
		},
		methods: {
			activePrice(index) {
				this.activeRecharge = index
			},
			back() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.recharge {
		width: 750rpx;
		height: 1624rpx;
		background: linear-gradient(180deg, #F5E8EB 0%, #FFFFFF 22%, #FFFFFF 100%);
		padding-top: 88rpx;
		box-sizing: border-box;

		.recharge-icon {
			position: relative;
			// margin-top: 88rpx;
			height: 88rpx;
			width: 750rpx;
			padding-top: 22rpx;
			box-sizing: border-box;

			.icon {
				// width: 15rpx;
				// height: 28rpx;
				position: absolute;
				z-index: 2;
				// background-color: red;
				// top: 100rpx;
				left: 10rpx;
				font-weight: 600;
			}

			.title {
				// width: 136rpx;
				height: 44rpx;
				font-size: 32rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				color: #000000;
				position: absolute;
				left: 308rpx;
			}
		}

		.recharge-info {
			width: 702rpx;
			height: 194rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 4rpx 30rpx 12rpx rgba(241, 241, 241, 0.5);
			border-radius: 16rpx;
			margin-top: 48rpx;
			margin-left: 24rpx;
			padding-top: 32rpx;
			padding-left: 32rpx;
			box-sizing: border-box;

			.info-title {
				width: 166rpx;
				height: 44rpx;
				font-size: 32rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				color: #999999;
			}

			.info-price {
				height: 58rpx;
				font-size: 48rpx;
				font-family: D-DIN-PRO, D-DIN-PRO;
				font-weight: 800;
				color: #000000;
				line-height: 58rpx;
				letter-spacing: 1px;
				margin-top: 28rpx;
			}
		}

		.recharge-content {
			width: 702rpx;
			height: 502rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 4rpx 30rpx 12rpx rgba(241, 241, 241, 0.5);
			border-radius: 16rpx;
			margin-top: 24rpx;
			margin-left: 24rpx;
			padding-top: 24rpx;
			padding-left: 12rpx;
			box-sizing: border-box;

			.content-title {
				width: 166rpx;
				height: 44rpx;
				font-size: 32rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 600;
				color: #333333;
				line-height: 44rpx;
				margin-left: 12rpx;
			}

			.content-price {
				width: 100%;
				height: 300rpx;
				// background-color: red;
				margin-top: 32rpx;
				display: flex;
				justify-content: space-between;
				flex-wrap: wrap;

				.prices,
				.prices-active {
					width: 210rpx;
					height: 128rpx;
					background: #FFFFFF;
					border-radius: 16rpx;
					border: 2rpx solid #E0E0E0;
					display: flex;
					justify-content: center;
					flex-wrap: wrap;
					padding-top: 28rpx;
					box-sizing: border-box;

					.price-1 {
						width: 210rpx;
						height: 42rpx;
						font-size: 48rpx;
						font-family: D-DIN-PRO, D-DIN-PRO;
						font-weight: bold;
						color: #070707;
						display: flex;
						justify-content: center;
					}

					.price-2 {
						width: 210rpx;
						height: 42rpx;
						font-size: 20rpx;
						font-family: PingFangSC, PingFang SC;
						font-weight: 600;
						color: #DF2002;
						display: flex;
						justify-content: center;
						margin-top: 10rpx;
					}
				}

				.prices-active {
					width: 210rpx;
					height: 128rpx;
					background: #FFFAFA;
					border-radius: 16rpx;
					border-right: 2rpx solid #FD735D;
					border-bottom: 2rpx solid #FD735D;
					background-image: url('../../static/vip/cz.png');
					background-size: 210rpx 128rpx;
					// object-fit: contain;
				}


			}

			.content-check {
				height: 32rpx;
				margin-left: 112rpx;
				margin-top: 30rpx;
				color: #D3D3D3;
				display: flex;
				align-content: flex-start;

				.check-1 {
					font-size: 24rpx;
					font-family: PingFangSC, PingFang SC;
					font-weight: 400;
					color: #2563F2;
					flex: 1;
					height: 32rpx;
				}
			}
		}

		.recharge-btn {
			width: 370rpx;
			height: 96rpx;
			background: linear-gradient(90deg, #EC8D7E 0%, #FF6F59 100%);
			box-shadow: 0rpx 4rpx 20rpx 0rpx #F7E4E1, inset 0rpx 2rpx 20rpx 6rpx rgba(255, 174, 161, 0.61);
			border-radius: 150rpx;
			font-size: 32rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-top: 40rpx;
		}
	}
</style>